import java.util.Scanner;
import java.lang.Math;

/** 
   This program reads a student's final class average,
   and prints out the appropriate letter grade.
*/
public class DoGrades
{
   public static void main(String[] args)
   {
      // Print prompt to enter a final class average 
      System.out.println("Enter final class average: ");

      // Read in final class average
      Scanner in = new Scanner(System.in);
      double average = in.nextDouble();

      String finalGrade;

      // Determine and print final grade
     
      // Your work here
      if (average <= 60.0) finalGrade = "F";
      else if (average > 60.0 && average <= 70.0) finalGrade = "D";
      else if (average > 70.0 && average <= 80.0) finalGrade = "C";
      else if (average > 80.0 && average <= 90.0) finalGrade = "B";
      else finalGrade = "A";

      System.out.println(finalGrade);
   }
}